package com.shujia.scala

object Demo13Concat {
  def main(args: Array[String]): Unit = {
    /**
      * 字符串拼接
      *
      */

    //java 的方式
    val builder = new StringBuilder()

    builder.append("java")
    builder.append("scala")
    builder.append("hadoop")

    println(builder.toString())

    //scala的方式

    val s = "java"
    val i = 1000
    val d = 3.14

    //底层还是StringBuilder
    val str = s"$s\t${i}java\t$d"

    println(str)


  }

}
